home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / Framewrk / FWPart / Include / FWSclNot.h < prev    next >
Encoding:
Text File  |  1996-04-25  |  2.6 KB  |  104 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWSclNot.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWSCLNOT_H
  11. #define FWSCLNOT_H
  12.  
  13. #ifndef FWCONTRL_H
  14. #include "FWContrl.h"
  15. #endif
  16.  
  17. // ----- Foundation Layer -----
  18.  
  19. #ifndef FWNOTIFN_H
  20. #include "FWNotifn.h"
  21. #endif
  22.  
  23. // ----- OS Layer -----
  24.  
  25. #ifndef FWFXMATH_H
  26. #include "FWFxMath.h"
  27. #endif
  28.  
  29. #ifndef FWPOINT_H
  30. #include "FWPoint.h"
  31. #endif
  32.  
  33. // ----- OpenDoc Includes -----
  34.  
  35. #ifndef FWODTYPS_H
  36. #include "FWODTyps.h"
  37. #endif
  38.  
  39. class FW_CScrollBar;
  40.  
  41. //========================================================================================
  42. //    CLASS FW_CScrollNotification
  43. //========================================================================================
  44.  
  45. class FW_CScrollNotification : public FW_CControlNotification
  46. {
  47. public:
  48.     FW_DECLARE_CLASS
  49.  
  50.     FW_CScrollNotification(FW_CScrollBar* sb,
  51.                            FW_XYSelector direction,
  52.                            FW_Fixed delta,
  53.                            FW_Boolean shouldScroll = TRUE);
  54.     FW_CScrollNotification(const FW_CScrollNotification& other);
  55.     virtual                ~FW_CScrollNotification();
  56.  
  57.     FW_Boolean                    operator==(const FW_CScrollNotification& other);
  58.     FW_CScrollNotification&        operator=(const FW_CScrollNotification& other);
  59.  
  60.     // ----- Attributes
  61.     
  62.     FW_XYSelector        GetDirection(Environment* ev) const;
  63.     FW_Fixed            GetDelta(Environment* ev) const;
  64.     FW_Fixed            GetScrollPos(Environment* ev) const;
  65.  
  66.     // ----- Internal use
  67.     FW_Boolean            ShouldScroll(Environment* ev) const;
  68.  
  69. private:
  70.     FW_XYSelector        fDirection;
  71.     FW_Fixed            fDelta;
  72.     FW_Boolean            fShouldScroll;
  73. };
  74.  
  75. //----------------------------------------------------------------------------------------
  76. // FW_CScrollNotification::GetDirection
  77. //----------------------------------------------------------------------------------------
  78.  
  79. inline FW_XYSelector FW_CScrollNotification::GetDirection(Environment*) const
  80. {
  81.     return fDirection;
  82. }
  83.  
  84. //----------------------------------------------------------------------------------------
  85. // FW_CScrollNotification::GetDelta
  86. //----------------------------------------------------------------------------------------
  87.  
  88. inline FW_Fixed FW_CScrollNotification::GetDelta(Environment*) const
  89. {
  90.     return fDelta;
  91. }
  92.  
  93. //----------------------------------------------------------------------------------------
  94. // FW_CScrollNotification::ShouldScroll
  95. //----------------------------------------------------------------------------------------
  96.  
  97. inline FW_Boolean FW_CScrollNotification::ShouldScroll(Environment*) const
  98. {
  99.     return fShouldScroll;
  100. }
  101.  
  102.  
  103. #endif
  104.